package marcelvm;

import bytecode.BytecodeParser;
import java.io.File;

/**
 * Hlavni trida interpreteru Marcel
 * @author honzee
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            if (args.length < 1) {
                System.out.println("arguments: <input.j> [args*]");
                System.exit(0);
            }

            BytecodeParser parser = new BytecodeParser(new File(args[0]));
            parser.start();

        } catch (MarcelVMException e) {
            System.out.println("MarcelVM-Error: " + e.getMessage());
        } catch (Exception e) {
            System.out.println("MarcelVM-Error: ");
            e.printStackTrace();
        }
    }

}
